from myelin.Ns import MYELIN_ONTOLOGY as MYELIN, FOAF
from myelin.rdf.bindery.ObjectTypes import LiteralTypeO

from AgentAccount import AgentAccount

from ObjectTypes import \
    UserAccountTypeO, UserAccountTypeS, \
    UserPreferencesTypeS
    
from mappings import \
    AgentAccountMap, \
    AccountPreferencesMap

class UserAccount(AgentAccount):
    
    ModelTypes = (UserAccountTypeO, UserAccountTypeS)
    
    RDF_BINDINGS = {
        'mPassword_Sha'     : ((MYELIN, 'password-sha'), LiteralTypeO, AgentAccountMap),
        'mLast_Login'       : ((MYELIN, 'last-login'), LiteralTypeO, AgentAccountMap),
        'mPreferences_For'  : ((MYELIN, 'preferences-for'), UserPreferencesTypeS, AccountPreferencesMap),
    }

    
CLASS_TYPES = {
    MYELIN + 'UserAccount' : UserAccount,
}